<!DOCTYPE HTML>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="./resources/geometry-interfaces-test-helpers.js"></script>
<script>

test(function() {
  var matrix2d = new DOMMatrix([1, 2, 3, 3.1, 2, 1]);
  matrix2d.skewXSelf();
  assert_2d_matrix_equals(matrix2d, [1, 2, 3, 3.1, 2, 1]);
}, "DOMMatrix skewX() - 2D matrix");

test(function() {
  var matrix2d = new DOMMatrix([1, 2, 3, 3.1, 2, 1]);
  matrix2d.skewXSelf(45);
  assert_2d_matrix_equals(matrix2d, [1, 2, 4, 5.1, 2, 1]);
}, "DOMMatrix skewX(45) - 2D matrix");

test(function() {
  var matrix3d = new DOMMatrix([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
  matrix3d.skewXSelf();
  assert_3d_matrix_equals(matrix3d, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
}, "DOMMatrix skewX() - 3D matrix");

test(function() {
  var matrix3d = new DOMMatrix([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
  matrix3d.skewXSelf(45);
  assert_3d_matrix_equals(matrix3d, [1, 2, 3, 4, 6, 8, 10, 12, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
}, "DOMMatrix skewX(45) - 3D matrix");

test(function() {
  var matrix2d = new DOMMatrix([1, 2, 3, 3.1, 2, 1]);
  matrix2d.skewYSelf();
  assert_2d_matrix_equals(matrix2d, [1, 2, 3, 3.1, 2, 1]);
}, "DOMMatrix skewY() - 2D matrix");

test(function() {
  var matrix2d = new DOMMatrix([2, 2, 2, 2, 2, 2]);
  matrix2d.skewYSelf(45);
  assert_2d_matrix_equals(matrix2d, [4, 4, 2, 2, 2, 2]);
}, "DOMMatrix skewY(45) - 2D matrix");

test(function() {
  var matrix3d = new DOMMatrix([1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
  matrix3d.skewYSelf();
  assert_3d_matrix_equals(matrix3d, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10.1, 11, 12, 13, 14, 15, 16.6]);
}, "DOMMatrix skewY() - 3D matrix");

test(function() {
  var matrix3d = new DOMMatrix([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]);
  matrix3d.skewYSelf(45);
  assert_3d_matrix_equals(matrix3d, [2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]);
}, "DOMMatrix skewY(45) - 3D matrix");
</script>
